package com.aynu.admin.controller;

import com.aynu.admin.domain.CommonResponse;
import com.aynu.admin.service.base.IStatistics;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/statistics")
public class StatisticsController {
    @Resource
    private IStatistics statistics;

    @GetMapping("/role")
    public CommonResponse<List<Map<Integer,Long > > > roleStatistics(){
        return statistics.roleStatistics();
    }
    @GetMapping("/order")
    public CommonResponse<List<Map<Integer,Long > > > orderStatistics(){
        return statistics.orderStatistics();
    }
    @GetMapping("/stroke")
    public CommonResponse<Map<String,Long > > strokeStatistics(){
        return statistics.strokeStatistics();
    }
}
